Generating PDF Forms
Overview
Adobe Acrobat and the PDF file format are popular tools for exchanging documents. Enterprises sometimes need to create Adobe Acrobat forms based on database information. A feature of this combination is the ability to have forms which are editable. Usually the output from a Qarbine analysis produces static text on the display and in an exported PDF document. A Qarbine custom cell enables the creation of PDF documents content with Adobe Acrobat Form awareness. This custom cell provides options to identify:
- Entry fields,
- Text fields,
- Checkbox and
- Radiobox groups.
Consider the sample PDF below.
This PDF form allows the name and other fields to be edited. Qarbine can export PDF documents and the PDF Form Widget custom cell provides awareness of editable PDF widgets. The above PDF was created by exporting the Qarbine result shown below.
For data content that you do not want to be editable, simply do not use the PDF Form custom cell.
The example template for the above can be found at “example/Custom cells/PDF Form Report”.
General Usage
The “PDF Form Widget” cell formula result is the value of the PDF form field. Standard formulas can be used to obtain this value.
The unique custom cell properties are shown below.
The PDF widget types are shown below.
The other custom cell properties are described below.
Property | Description |
---|---|
Label | The label for use by the checkbox and radiobox items. It appears to the right of the widget’s image. |
Required | A boolean for use by text and entry fields indicating that something must be typed into the field. |
HTML read only | A boolean indicating if any interaction is allowed when presenting in HTML format. |
PDF read only | A boolean indicating if any interaction is allowed with the exported PDF file. |
Radio group | For a radio group, this is the name of the group that radioboxes reference..For a radiobox this is the name of the radio group in which it belongs. |
Radio button value | For a radiobox, this is its underlying value. The result of the cell’s expression is compared to this value to determine if the radiobox is checked. |
Entry Field
For the entry field
the empty defaults can be used.
Text Field
For the text field
the empty defaults can be used.
With these 2 properties checked
the result bottom area output is
The color radio group is editable while the text area is now. This readonly behavior applies to all of the widget types. Opening the PDF file shows the following bottom portion.
With the “HTML is read only” unchecked, regular HTML widgets are shown in the output. This may be useful in an embedded situation. A more likely combination is to have the analysis HTML result widget readonly and the PDF widget editable.
Radio Group
For a radio group and its radioboxes a convenient approach is to have the radio group cell determine the value of the associated property and store that in a report variable. To avoid redundancy, the radioboxes can then simply reference this variable in their cell expression. The “labels” are what is displayed next to the radiobox image and may be different from the underlying value.
For this radio group
these cells were used.
The first cell properties of interest are shown below.
The 2nd cell properties of interest are shown below.
The 3rd cell properties of interest are shown below.
The 4th cell properties of interest are shown below.
Checkbox
For the checkbox
the cell properties of interest are shown below.